//
//  LGTeamDetailSettingView.m
//  HeartDiseaseManage
//
//  Created by 1234 on 2023/2/16.
//  团队详情-管理员设置

#import "LGTeamDetailSettingView.h"

@interface LGTeamDetailSettingView()

/**   */
@property (nonatomic , strong)UILabel *titleLabel;
/**   */
@property (nonatomic , strong)UILabel *descLabel;
/**   */
@property (nonatomic , strong)UILabel *nameLabel;
/**   */
@property (nonatomic , strong)UIImageView *tipView;

@end

@implementation LGTeamDetailSettingView

- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [self createSubView];
    }
    return self;
}

-(void)setManage:(NSString *)manage{
    _manage = manage;
    self.nameLabel.text = manage;
}

#pragma mark
#pragma mark ====> 创建控件
-(void)createSubView{
    [self addSubview:self.titleLabel];
    [self addSubview:self.descLabel];
    [self addSubview:self.nameLabel];
    [self addSubview:self.tipView];
    [self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.titleLabel.mas_right).offset(viewPix(10));
        make.right.equalTo(self.tipView.mas_left).offset(-2);
        make.centerY.equalTo(self.titleLabel);
    }];
    [self.tipView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(self).offset(-viewPix(16));
        make.centerY.equalTo(self.titleLabel);
        make.width.height.equalTo(@(viewPix(16)));
    }];
}
-(UILabel *)titleLabel{
    if(!_titleLabel){
        _titleLabel = [UILabel lableWithText:@"管理员设置（限1人）" colorString:@"#333333" textFont:LGFont(16) textAlignment:NSTextAlignmentLeft lines:1];
        _titleLabel.frame = CGRectMake(viewPix(16), viewPix(16), viewPix(160)+iPadMargin(50), viewPix(23));
    }
    return _titleLabel;
}

-(UILabel *)descLabel{
    if(!_descLabel){
        _descLabel = [UILabel lableWithText:@"权限：添加、删除成员，修改团队名称和介绍" colorString:@"#999999" textFont:LGFont(14) textAlignment:NSTextAlignmentLeft lines:1];
        _descLabel.frame = CGRectMake(viewPix(17), kMaxY(self.titleLabel.frame)+viewPix(7), viewPix(290)+iPadMargin(100), viewPix(20));
    }
    return _descLabel;
}

-(UILabel *)nameLabel{
    if(!_nameLabel){
        _nameLabel = [UILabel lableWithText:@"" colorString:@"#666666" textFont:LGFont(16) textAlignment:NSTextAlignmentRight lines:1];
    }
    return _nameLabel;
}

-(UIImageView *)tipView{
    if(!_tipView){
        _tipView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"grayTip16"]];
    }
    return _tipView;
}

@end
